package com.interview.javabase.algorithm;

import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: zhangshuguang@vichain.com
 * @date: 2019/06/12 15:19
 */
@SpringBootTest
public class Demo8 {

    @Test
    public void solution1() {
        int[] arr = {1, 3, 2, 0, 2, 5};
        for (int i = 0; i < arr.length; i++) {
            for (int i1 = i+1; i1 < arr.length; i1++) {
                if (arr[i] == arr[i1]){
                    System.out.println("有一个重复的就是 "+ arr[i]);
                    break;
                }
            }
        }
    }
}
